package io.work;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class test3 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis=new FileInputStream("v12.jpg");
        FileOutputStream fos=new FileOutputStream("v12_cp.jpg");
        byte[] data=new byte[1024];
        int b;
        long start = System.currentTimeMillis();
        while ((b=fis.read(data))!=-1){
            fos.write(data,0,b);
        }
        long end =System.currentTimeMillis();
        System.out.println("块复制完毕,用时"+(start-end)+"ms");
        fis.close();
        fos.close();
    }
}
